import json
import os

template = "q {0} | Talk with {0} in qq | "
url_scheme = "tencent://message/?uin={0}\u0026Site=qq\u0026Menu=yes"

if __name__ == "__main__":
    dotfiles_dir = os.getenv('DOTFILES')
    vip_path = os.path.join(dotfiles_dir, 'local', 'qq', 'important.json')
    # print(vip_path)
    with open(vip_path) as fp:
        data = json.loads(fp.read())
    for k in data:
        content = template.format(k) + url_scheme.format(data[k]['qq'])
        print(content)
